3.2.5 \(\int \frac {x (a+b \csc ^{-1}(c x))}{(d+e x^2)^2} \, dx\) [105]

Optimal. Leaf size=134 \[ \frac {-a-b \csc ^{-1}(c x)}{2 e \left (d+e x^2\right )}-\frac {b c x \text {ArcTan}\left (\sqrt {-1+c^2 x^2}\right )}{2 d e \sqrt {c^2 x^2}}+\frac {b c x \text {ArcTan}\left (\frac {\sqrt {e} \sqrt {-1+c^2 x^2}}{\sqrt {c^2 d+e}}\right )}{2 d \sqrt {e} \sqrt {c^2 d+e} \sqrt {c^2 x^2}} \]

[Out]

1/2*(-a-b*arccsc(c*x))/e/(e*x^2+d)-1/2*b*c*x*arctan((c^2*x^2-1)^(1/2))/d/e/(c^2*x^2)^(1/2)+1/2*b*c*x*arctan(e^
(1/2)*(c^2*x^2-1)^(1/2)/(c^2*d+e)^(1/2))/d/e^(1/2)/(c^2*d+e)^(1/2)/(c^2*x^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 131, normalized size of antiderivative = 0.98, number of steps used = 7, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {5345, 457, 88, 65, 211} \begin {gather*} -\frac {a+b \csc ^{-1}(c x)}{2 e \left (d+e x^2\right )}-\frac {b c x \text {ArcTan}\left (\sqrt {c^2 x^2-1}\right )}{2 d e \sqrt {c^2 x^2}}+\frac {b c x \text {ArcTan}\left (\frac {\sqrt {e} \sqrt {c^2 x^2-1}}{\sqrt {c^2 d+e}}\right )}{2 d \sqrt {e} \sqrt {c^2 x^2} \sqrt {c^2 d+e}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*ArcCsc[c*x]))/(d + e*x^2)^2,x]

[Out]

-1/2*(a + b*ArcCsc[c*x])/(e*(d + e*x^2)) - (b*c*x*ArcTan[Sqrt[-1 + c^2*x^2]])/(2*d*e*Sqrt[c^2*x^2]) + (b*c*x*A
rcTan[(Sqrt[e]*Sqrt[-1 + c^2*x^2])/Sqrt[c^2*d + e]])/(2*d*Sqrt[e]*Sqrt[c^2*d + e]*Sqrt[c^2*x^2])

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 88

Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), In
t[(e + f*x)^p/(a + b*x), x], x] - Dist[d/(b*c - a*d), Int[(e + f*x)^p/(c + d*x), x], x] /; FreeQ[{a, b, c, d,
e, f, p}, x] &&  !IntegerQ[p]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 5345

Int[((a_.) + ArcCsc[(c_.)*(x_)]*(b_.))*(x_)*((d_.) + (e_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d + e*x^2)^(p + 1
)*((a + b*ArcCsc[c*x])/(2*e*(p + 1))), x] + Dist[b*c*(x/(2*e*(p + 1)*Sqrt[c^2*x^2])), Int[(d + e*x^2)^(p + 1)/
(x*Sqrt[c^2*x^2 - 1]), x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[p, -1]

Rubi steps

\begin {align*} \int \frac {x \left (a+b \csc ^{-1}(c x)\right )}{\left (d+e x^2\right )^2} \, dx &=-\frac {a+b \csc ^{-1}(c x)}{2 e \left (d+e x^2\right )}-\frac {(b c x) \int \frac {1}{x \sqrt {-1+c^2 x^2} \left (d+e x^2\right )} \, dx}{2 e \sqrt {c^2 x^2}}\\ &=-\frac {a+b \csc ^{-1}(c x)}{2 e \left (d+e x^2\right )}-\frac {(b c x) \text {Subst}\left (\int \frac {1}{x \sqrt {-1+c^2 x} (d+e x)} \, dx,x,x^2\right )}{4 e \sqrt {c^2 x^2}}\\ &=-\frac {a+b \csc ^{-1}(c x)}{2 e \left (d+e x^2\right )}+\frac {(b c x) \text {Subst}\left (\int \frac {1}{\sqrt {-1+c^2 x} (d+e x)} \, dx,x,x^2\right )}{4 d \sqrt {c^2 x^2}}-\frac {(b c x) \text {Subst}\left (\int \frac {1}{x \sqrt {-1+c^2 x}} \, dx,x,x^2\right )}{4 d e \sqrt {c^2 x^2}}\\ &=-\frac {a+b \csc ^{-1}(c x)}{2 e \left (d+e x^2\right )}+\frac {(b x) \text {Subst}\left (\int \frac {1}{d+\frac {e}{c^2}+\frac {e x^2}{c^2}} \, dx,x,\sqrt {-1+c^2 x^2}\right )}{2 c d \sqrt {c^2 x^2}}-\frac {(b x) \text {Subst}\left (\int \frac {1}{\frac {1}{c^2}+\frac {x^2}{c^2}} \, dx,x,\sqrt {-1+c^2 x^2}\right )}{2 c d e \sqrt {c^2 x^2}}\\ &=-\frac {a+b \csc ^{-1}(c x)}{2 e \left (d+e x^2\right )}-\frac {b c x \tan ^{-1}\left (\sqrt {-1+c^2 x^2}\right )}{2 d e \sqrt {c^2 x^2}}+\frac {b c x \tan ^{-1}\left (\frac {\sqrt {e} \sqrt {-1+c^2 x^2}}{\sqrt {c^2 d+e}}\right )}{2 d \sqrt {e} \sqrt {c^2 d+e} \sqrt {c^2 x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.53, size = 286, normalized size = 2.13 \begin {gather*} -\frac {\frac {2 a}{d+e x^2}+\frac {2 b \csc ^{-1}(c x)}{d+e x^2}-\frac {2 b \text {ArcSin}\left (\frac {1}{c x}\right )}{d}+\frac {b \sqrt {e} \log \left (\frac {4 i d e-4 c d \sqrt {e} \left (c \sqrt {d}+i \sqrt {-c^2 d-e} \sqrt {1-\frac {1}{c^2 x^2}}\right ) x}{b \sqrt {-c^2 d-e} \left (\sqrt {d}-i \sqrt {e} x\right )}\right )}{d \sqrt {-c^2 d-e}}+\frac {b \sqrt {e} \log \left (\frac {4 i \left (-d e+c d \sqrt {e} \left (i c \sqrt {d}+\sqrt {-c^2 d-e} \sqrt {1-\frac {1}{c^2 x^2}}\right ) x\right )}{b \sqrt {-c^2 d-e} \left (\sqrt {d}+i \sqrt {e} x\right )}\right )}{d \sqrt {-c^2 d-e}}}{4 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*ArcCsc[c*x]))/(d + e*x^2)^2,x]

[Out]

-1/4*((2*a)/(d + e*x^2) + (2*b*ArcCsc[c*x])/(d + e*x^2) - (2*b*ArcSin[1/(c*x)])/d + (b*Sqrt[e]*Log[((4*I)*d*e
- 4*c*d*Sqrt[e]*(c*Sqrt[d] + I*Sqrt[-(c^2*d) - e]*Sqrt[1 - 1/(c^2*x^2)])*x)/(b*Sqrt[-(c^2*d) - e]*(Sqrt[d] - I
*Sqrt[e]*x))])/(d*Sqrt[-(c^2*d) - e]) + (b*Sqrt[e]*Log[((4*I)*(-(d*e) + c*d*Sqrt[e]*(I*c*Sqrt[d] + Sqrt[-(c^2*
d) - e]*Sqrt[1 - 1/(c^2*x^2)])*x))/(b*Sqrt[-(c^2*d) - e]*(Sqrt[d] + I*Sqrt[e]*x))])/(d*Sqrt[-(c^2*d) - e]))/e

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(349\) vs. \(2(112)=224\).
time = 7.34, size = 350, normalized size = 2.61

method result size
derivativedivides \(\frac {-\frac {a \,c^{4}}{2 e \left (c^{2} e \,x^{2}+c^{2} d \right )}-\frac {b \,c^{4} \mathrm {arccsc}\left (c x \right )}{2 e \left (c^{2} e \,x^{2}+c^{2} d \right )}+\frac {b c \sqrt {c^{2} x^{2}-1}\, \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right )}{2 e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x d}-\frac {b c \sqrt {c^{2} x^{2}-1}\, \ln \left (-\frac {2 \left (-\sqrt {-\frac {c^{2} d +e}{e}}\, \sqrt {c^{2} x^{2}-1}\, e +\sqrt {-c^{2} d e}\, c x +e \right )}{e c x +\sqrt {-c^{2} d e}}\right )}{4 e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x d \sqrt {-\frac {c^{2} d +e}{e}}}-\frac {b c \sqrt {c^{2} x^{2}-1}\, \ln \left (-\frac {2 \left (\sqrt {-\frac {c^{2} d +e}{e}}\, \sqrt {c^{2} x^{2}-1}\, e +\sqrt {-c^{2} d e}\, c x -e \right )}{-e c x +\sqrt {-c^{2} d e}}\right )}{4 e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x d \sqrt {-\frac {c^{2} d +e}{e}}}}{c^{2}}\) \(350\)
default \(\frac {-\frac {a \,c^{4}}{2 e \left (c^{2} e \,x^{2}+c^{2} d \right )}-\frac {b \,c^{4} \mathrm {arccsc}\left (c x \right )}{2 e \left (c^{2} e \,x^{2}+c^{2} d \right )}+\frac {b c \sqrt {c^{2} x^{2}-1}\, \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right )}{2 e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x d}-\frac {b c \sqrt {c^{2} x^{2}-1}\, \ln \left (-\frac {2 \left (-\sqrt {-\frac {c^{2} d +e}{e}}\, \sqrt {c^{2} x^{2}-1}\, e +\sqrt {-c^{2} d e}\, c x +e \right )}{e c x +\sqrt {-c^{2} d e}}\right )}{4 e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x d \sqrt {-\frac {c^{2} d +e}{e}}}-\frac {b c \sqrt {c^{2} x^{2}-1}\, \ln \left (-\frac {2 \left (\sqrt {-\frac {c^{2} d +e}{e}}\, \sqrt {c^{2} x^{2}-1}\, e +\sqrt {-c^{2} d e}\, c x -e \right )}{-e c x +\sqrt {-c^{2} d e}}\right )}{4 e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x d \sqrt {-\frac {c^{2} d +e}{e}}}}{c^{2}}\) \(350\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arccsc(c*x))/(e*x^2+d)^2,x,method=_RETURNVERBOSE)

[Out]

1/c^2*(-1/2*a*c^4/e/(c^2*e*x^2+c^2*d)-1/2*b*c^4/e/(c^2*e*x^2+c^2*d)*arccsc(c*x)+1/2*b*c/e*(c^2*x^2-1)^(1/2)/((
c^2*x^2-1)/c^2/x^2)^(1/2)/x/d*arctan(1/(c^2*x^2-1)^(1/2))-1/4*b*c/e*(c^2*x^2-1)^(1/2)/((c^2*x^2-1)/c^2/x^2)^(1
/2)/x/d/(-(c^2*d+e)/e)^(1/2)*ln(-2*(-(-(c^2*d+e)/e)^(1/2)*(c^2*x^2-1)^(1/2)*e+(-c^2*d*e)^(1/2)*c*x+e)/(e*c*x+(
-c^2*d*e)^(1/2)))-1/4*b*c/e*(c^2*x^2-1)^(1/2)/((c^2*x^2-1)/c^2/x^2)^(1/2)/x/d/(-(c^2*d+e)/e)^(1/2)*ln(-2*((-(c
^2*d+e)/e)^(1/2)*(c^2*x^2-1)^(1/2)*e+(-c^2*d*e)^(1/2)*c*x-e)/(-e*c*x+(-c^2*d*e)^(1/2))))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arccsc(c*x))/(e*x^2+d)^2,x, algorithm="maxima")

[Out]

-1/2*(2*(c^2*x^2*e^2 + c^2*d*e)*integrate(1/2*x*e^(1/2*log(c*x + 1) + 1/2*log(c*x - 1))/(c^2*x^4*e^2 + (c^2*d*
e - e^2)*x^2 - d*e + (c^2*x^4*e^2 + (c^2*d*e - e^2)*x^2 - d*e)*e^(log(c*x + 1) + log(c*x - 1))), x) + arctan2(
1, sqrt(c*x + 1)*sqrt(c*x - 1)))*b/(x^2*e^2 + d*e) - 1/2*a/(x^2*e^2 + d*e)

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 395, normalized size = 2.95 \begin {gather*} \left [-\frac {2 \, a c^{2} d^{2} + 2 \, a d e + \sqrt {-c^{2} d e - e^{2}} {\left (b x^{2} e + b d\right )} \log \left (-\frac {c^{2} d - {\left (c^{2} x^{2} - 2\right )} e + 2 \, \sqrt {c^{2} x^{2} - 1} \sqrt {-c^{2} d e - e^{2}}}{x^{2} e + d}\right ) + 2 \, {\left (b c^{2} d^{2} + b d e\right )} \operatorname {arccsc}\left (c x\right ) + 4 \, {\left (b c^{2} d^{2} + b x^{2} e^{2} + {\left (b c^{2} d x^{2} + b d\right )} e\right )} \arctan \left (-c x + \sqrt {c^{2} x^{2} - 1}\right )}{4 \, {\left (c^{2} d^{3} e + d x^{2} e^{3} + {\left (c^{2} d^{2} x^{2} + d^{2}\right )} e^{2}\right )}}, -\frac {a c^{2} d^{2} + a d e - \sqrt {c^{2} d e + e^{2}} {\left (b x^{2} e + b d\right )} \arctan \left (\frac {\sqrt {c^{2} x^{2} - 1} \sqrt {c^{2} d e + e^{2}}}{c^{2} d + e}\right ) + {\left (b c^{2} d^{2} + b d e\right )} \operatorname {arccsc}\left (c x\right ) + 2 \, {\left (b c^{2} d^{2} + b x^{2} e^{2} + {\left (b c^{2} d x^{2} + b d\right )} e\right )} \arctan \left (-c x + \sqrt {c^{2} x^{2} - 1}\right )}{2 \, {\left (c^{2} d^{3} e + d x^{2} e^{3} + {\left (c^{2} d^{2} x^{2} + d^{2}\right )} e^{2}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arccsc(c*x))/(e*x^2+d)^2,x, algorithm="fricas")

[Out]

[-1/4*(2*a*c^2*d^2 + 2*a*d*e + sqrt(-c^2*d*e - e^2)*(b*x^2*e + b*d)*log(-(c^2*d - (c^2*x^2 - 2)*e + 2*sqrt(c^2
*x^2 - 1)*sqrt(-c^2*d*e - e^2))/(x^2*e + d)) + 2*(b*c^2*d^2 + b*d*e)*arccsc(c*x) + 4*(b*c^2*d^2 + b*x^2*e^2 +
(b*c^2*d*x^2 + b*d)*e)*arctan(-c*x + sqrt(c^2*x^2 - 1)))/(c^2*d^3*e + d*x^2*e^3 + (c^2*d^2*x^2 + d^2)*e^2), -1
/2*(a*c^2*d^2 + a*d*e - sqrt(c^2*d*e + e^2)*(b*x^2*e + b*d)*arctan(sqrt(c^2*x^2 - 1)*sqrt(c^2*d*e + e^2)/(c^2*
d + e)) + (b*c^2*d^2 + b*d*e)*arccsc(c*x) + 2*(b*c^2*d^2 + b*x^2*e^2 + (b*c^2*d*x^2 + b*d)*e)*arctan(-c*x + sq
rt(c^2*x^2 - 1)))/(c^2*d^3*e + d*x^2*e^3 + (c^2*d^2*x^2 + d^2)*e^2)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \left (a + b \operatorname {acsc}{\left (c x \right )}\right )}{\left (d + e x^{2}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*acsc(c*x))/(e*x**2+d)**2,x)

[Out]

Integral(x*(a + b*acsc(c*x))/(d + e*x**2)**2, x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arccsc(c*x))/(e*x^2+d)^2,x, algorithm="giac")

[Out]

Exception raised: RuntimeError >> An error occurred running a Giac command:INPUT:sage2OUTPUT:Warning, integrat
ion of abs or sign assumes constant sign by intervals (correct if the argument is real):Check [abs(sageVARx)]s
ym2poly/r2sym(

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x\,\left (a+b\,\mathrm {asin}\left (\frac {1}{c\,x}\right )\right )}{{\left (e\,x^2+d\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*asin(1/(c*x))))/(d + e*x^2)^2,x)

[Out]

int((x*(a + b*asin(1/(c*x))))/(d + e*x^2)^2, x)

________________________________________________________________________________________